{{ define "header" }}


<header class="text-gray-600 body-font">
    <div class="w-full mx-auto flex flex-wrap flex-col md:flex-row items-center">
        <a class="flex title-font font-medium items-center text-gray-900 mb-4 md:mb-0" href="/">
            <img src="/image/gblog.png" width="32px" height="32px" />
            <span class="ml-3 text-xl">gblog</span>
        </a>
        <nav
            class="md:mr-auto md:ml-4 md:py-1 md:pl-4 md:border-l md:border-gray-400	flex flex-wrap items-center text-base justify-center">
            <a class="nav-link block pr-2 lg:px-2 py-2 text-gray-600 hover:text-gray-700 focus:text-gray-700 transition duration-150 ease-in-out dropdown-toggle flex items-center whitespace-nowrap"
                href="#" data-mdb-ripple="true" data-mdb-ripple-color="light" type="button" id="dropdownMenuButtonY"
                data-bs-toggle="dropdown" aria-expanded="false">分类
                <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="caret-down" class="w-2 ml-2"
                    role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
                    <path fill="currentColor"
                        d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z">
                    </path>
                </svg>

            </a>
            <a class="nav-link block pr-2 lg:px-2 py-2 text-gray-600 hover:text-gray-700 focus:text-gray-700 transition duration-150 ease-in-out dropdown-toggle flex items-center whitespace-nowrap"
                href="#" data-mdb-ripple="true" data-mdb-ripple-color="light" type="button" id="dropdownMenuButtonY"
                data-bs-toggle="dropdown" aria-expanded="false">标签
                <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="caret-down" class="w-2 ml-2"
                    role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
                    <path fill="currentColor"
                        d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z">
                    </path>
                </svg>
            </a>
        </nav>
    </div>
</header>



<section class="browser container py-2">
    <header class="navbar">
        <section class="navbar-section">
            <div class="dropdown">
                <a href="#" class="btn btn-link dropdown-toggle" tabindex="0">
                    分类 <i class="icon icon-caret"></i>
                </a>
                <ul class="menu">
                    {{ range $category := .Categories }}
                    {{ if ne $category.Count 0 }}
                    <li><a class="navbar-item" href="/category/{{ $category.ID }}">{{ $category.Name }}
                            ({{ $category.Count }})</a></li>
                    {{ end }}
                    {{ end }}
                </ul>
            </div>
        </section>
        <section class="navbar-center">
            <a href="/" class="navbar-brand mr-2">
                <img src="/image/logo.png">
            </a>
        </section>
        <section class="navbar-section">
            <div class="dropdown">
                <a href="#" class="btn btn-link dropdown-toggle" tabindex="0">
                    标签 <i class="icon icon-caret"></i>
                </a>
                <ul class="menu">
                    {{ range $tag := .Tags }}
                    {{ if ne $tag.Count 0 }}
                    <li><a class="navbar-item" href="/tag/{{ $tag.Name }}">{{ $tag.Name }} ({{ $tag.Count }})</a></li>
                    {{ end }}
                    {{ end }}
                </ul>
            </div>
        </section>
    </header>

    {{ end }}